/*
 * Created by Jesse Phillips
 * Created on Feb 2, 2006
 */

public class FastFib {
	public static void main(String args[]) {
		System.out.println(fibonachi(30));
	}
	
	public static int fibonachi(int value) {
		//Create call to start recursive calls
		/*ans bl*/
		int[] foobar = fib(value);
		return foobar[0]+foobar[1];
		/*ans ab*/
	}
	
	public static int[] fib(int value) {
		//insert recursive call
		/*ans bl*/
		int[] result = new int[2];
		if(value < 2) {
			result[0] = 0;
			result[1] = value;
		}else {
			int foo[] = fib(value-1);
			result[0] = foo[0]+foo[1];
			result[1] = foo[0];
		}
		
		return result;
		/*ans ab*/
	}
}
